<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
    <div class="easyui-panel"  style="padding:50px 100px;height:100%">
        <form id="user-info-form" method="post"  style="width:600px;margin:0 auto">
         
            <div style="margin-bottom:20px">
                <input class="easyui-textbox" name="uaccount" style="width:100%" data-options="label:'登录账户:',readonly:true,value:'${(user.uaccount)!}',required:true">
            </div>
            <div style="margin-bottom:20px">
                <input class="easyui-textbox" name="uname" style="width:100%" data-options="label:'姓名:',value:'${(user.uname)!}',required:true">
            </div>
            <div style="margin-bottom:20px">
                <input class="easyui-textbox" name="usimplename" style="width:100%" data-options="label:'简称:',value:'${(user.usimplename)!}',required:true">
            </div>
            
            <div style="margin-bottom:20px">
                <input class="easyui-textbox" name="uworkphone" style="width:100%" data-options="label:'工作电话:',value:'${(user.uworkphone)!}'">
            </div>
        </form>
        <div style="text-align:center;padding:5px 0">
            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()" style="width:80px">保存</a>          
        </div>
    </div>





<script>          
function submitForm(){
	    $.messager.progress();
	     $('#user-info-form').form('submit',{
	        url:'${Domain}api/user/update',
	        onSubmit: function(param){   
	              var isValid = $(this).form('validate');
					if (!isValid){
						$.messager.progress('close');	// 如果表单是无效的则隐藏进度条
							return false;
					}	 	  		  
				    
				},
				success:function(data){
				var json = eval('(' + data + ')');  // change the JSON string to javascript object
				if (json.status){
				 	$.messager.show({
		                title:'修改提示',
		                msg:'更新完成',
		                timeout:2000,
		                showType:'slide'
	            	});					 				           
				}else
				{
					$.messager.alert('提示',json.msg,'error');
				}
					   
				$.messager.progress('close');
		}
	  });
}


	        
</script>


</body>
</html>